import updateManager from './common/updateManager';

App({
  onLaunch: function () {
    /**
     * 获取当前设备信息
     */
    wx.getSystemInfo({
      success: e => {
        /**
         * 当前设备信息
         */
        this.globalData.deviceInfo = e
        /**
         * 头部导航栏，胶囊位置信息
         */
        this.globalData.StatusBar = e.statusBarHeight;
        let custom = wx.getMenuButtonBoundingClientRect();
        this.globalData.Custom = custom;
        this.globalData.CustomBar = custom.bottom + custom.top - e.statusBarHeight;
      }
    })
  },
  globalData: {
    GET: 'GET',
    POST: 'POST',
    PUT: 'PUT',
    DELETE: 'DELETE',
    typePOST: 'application/json',
    typeGET: 'application/x-www-form-urlencoded',
  },
  onShow: function () {
    updateManager();
  },
});